const mongoose= require('mongoose')
const Schema = mongoose.Schema

const AdminSchema = new Schema({
  // 账号
  account: {
    type: String,
    require: true
  },
  // 密码
  password: {
    type: String,
    require: true
  },
  // token
  token: {
    type: String,
    require: false
  },
  // token到期时间
  expireTime: {
    type: Number,
    require: false
  },
  // token更新时间
  updateTime: {
    type: Number,
    require: false
  }
})

module.exports =mongoose.model('Admin', AdminSchema, 'admin')